<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLinksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('links', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment("网站名称");
            $table->string('url')->comment("网站链接");
            $table->string('logo')->nullable()->comment("LOGO路径");
            $table->boolean('type')->default(false)->comment("友情链接类型（文字或LOGO）");
            $table->string('info')->nullable()->comment("描述文字");
            $table->integer('sort')->default(0)->comment("排序");
            $table->boolean('state')->default(false)->comment("审核，1为审核，0为未审核");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('links');
    }
}
